﻿using System;
using System.Linq;

namespace NativeCode.Core.Data
{
	public interface ILambdaDataSourceProvider<TLambdaQuery, TDataItem>
		where TLambdaQuery : LambdaQuery
		where TDataItem : new()
	{
		Func<TLambdaQuery, IQueryable<TDataItem>> DataSourceLambda { get; set; }

		Func<int> DataSourceLambdaCount { get; set; }

		void Bind(Func<TLambdaQuery, IQueryable<TDataItem>> query, Func<int> queryCount);
	}
}